<html>
<header>
<script src="http://code.jquery.com/jquery-1.7.1.js"></script>

</header>
<body>
<script type="text/javascript">
$(document).ready(function(){
function LocalTimetoUTC(localTime)
{
try{
	 var dateTimeComponents = localTime.split(" ");
	  var dateComponent = dateTimeComponents[0].split("-");
	  var timeComponent = dateTimeComponents[1].split(":");
}catch(e){
	return false;	
}
	  var ampm = dateTimeComponents[2];

	  var dat = new Date(parseInt(dateComponent[0]),
	    parseInt(dateComponent[1]) -1,
	    parseInt(dateComponent[2]),
	    parseInt(timeComponent[0]) % 12,
	    parseInt(timeComponent[1]),
	    parseInt(timeComponent[2]) );

	  if (ampm == "PM")  // do all locales use 'AM' / 'PM' ??
	  {
	    dat.setHours(dat.getHours() + 12);
	  }
	  
return dat;

}


alert(LocalTimetoUTC('231312313'));
});





</script>


</body>


</html>